home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / dup.z / dup
Encoding:
Text File  |  2002-10-03  |  3.2 KB  |  67 lines

  1.  
  2.  
  3.  
  4. dddduuuupppp((((2222))))                                                                  dddduuuupppp((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _dddd_uuuu_pppp - duplicate an open file descriptor
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh_>>>>
  13.  
  14.      _iiii_nnnn_tttt _dddd_uuuu_pppp_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_))))_;;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _f_i_l_d_e_s is a file descriptor obtained from a _cccc_rrrr_eeee_aaaa_tttt, _oooo_pppp_eeee_nnnn, _dddd_uuuu_pppp, _ffff_cccc_nnnn_tttt_llll,
  18.      _pppp_iiii_pppp_eeee, or _iiii_oooo_cccc_tttt_llll system call.  _dddd_uuuu_pppp returns a new file descriptor having the
  19.      following in common with the original:
  20.  
  21.           Same open file (or pipe).
  22.  
  23.           Same file pointer (i.e., both file descriptors share one file
  24.           pointer).
  25.  
  26.           Same access mode (read, write or read/write).
  27.  
  28.      The new file descriptor is set to remain open across _eeee_xxxx_eeee_cccc system calls
  29.      [see _ffff_cccc_nnnn_tttt_llll(2)].
  30.  
  31.      The file descriptor returned is the lowest one available.
  32.  
  33.      _dddd_uuuu_pppp will fail if one or more of the following are true:
  34.  
  35.      _EEEE_BBBB_AAAA_DDDD_FFFF          _f_i_l_d_e_s is not a valid open file descriptor.
  36.  
  37.      _EEEE_IIII_NNNN_TTTT_RRRR          A signal was caught during the _dddd_uuuu_pppp system call.
  38.  
  39.      _EEEE_MMMM_FFFF_IIII_LLLL_EEEE         The process has too many open files [see _gggg_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt(2)].
  40.  
  41.      _EEEE_NNNN_OOOO_LLLL_IIII_NNNN_KKKK        _f_i_l_d_e_s is on a remote machine and the link to that machine
  42.                     is no longer active.
  43.  
  44. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  45.      _cccc_llll_oooo_ssss_eeee(2), _cccc_rrrr_eeee_aaaa_tttt(2), _eeee_xxxx_eeee_cccc(2), _ffff_cccc_nnnn_tttt_llll(2), _gggg_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt(2), _oooo_pppp_eeee_nnnn(2), _pppp_iiii_pppp_eeee(2),
  46.      _dddd_uuuu_pppp_2222(3C), _llll_oooo_cccc_kkkk_ffff(3C).
  47.  
  48. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  49.      Upon successful completion a non-negative integer, namely the file
  50.      descriptor, is returned.  Otherwise, a value of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo
  51.      is set to indicate the error.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.